<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="auth" uri="http://www.recharge.com/authority" %>
<auth:authority role="0" />
<!DOCTYPE html>
<html>
<head>
  <title>详细页面</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link href="../easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
  <link href="../easyui/themes/icon.css" rel="stylesheet" type="text/css" />
  <script src="../js/jquery-1.8.0.min.js" type="text/javascript"></script>
  <script src="../easyui/jquery.easyui.min.js" type="text/javascript"></script>

</head>
<body>
<form id="merchant-add-form" method="post">
<table>

  <tr>
    <td><label for="merId">商户id:</label></td>
    <td><input class="easyui-validatebox" type="text" name="merId" id="merId"/></td>
  </tr>
  
  <tr>
    <td><label for="merName">商户名称:</label></td>
    <td><input class="easyui-validatebox" type="text" name="merName" id="merName"/></td>
  </tr>
  <tr>
    <td><label for="balanceAdd">加款金额:</label></td>
    <td><input class="easyui-validatebox" type="text" name="balanceAdd" id="balanceAdd"/></td>
  </tr>
  
  <tr>
    <td><label for="remark">备注:</label></td>
    <td><input class="easyui-validatebox" type="text" name="remark" id="remark"/></td>
  </tr>
</table>

  <a id="merchant-add-form-button" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save'">确认</a>
</form>

<script language="JavaScript" type="application/javascript">

  $('#merchant-add-form').form({
    url:"tradeMerchant/updateBalance",
    success:function(data){
      data = JSON.parse(data);
      if(data.code == 0){
        $.messager.alert('Info','添加成功');
        $('#detailDialog').dialog("close");
      }else{
        $.messager.alert('Info','添加失败');
      }
    }
  });

  $('#merchant-add-form-button').bind('click', function(){
    $('#merchant-add-form').submit();
  });
</script>
</body>
</html>
